<template>
  <div>
      <div id="block">
        <!-- current-change当前页size-change每页条数current-page当前页数，支持 .sync 修饰符page-sizes每页显示条目个数，支持 .sync 修饰符-->
        <el-pagination
          :page-sizes="[10, 20, 30, 40, 50,100]"
          :current-page="allPages.currentPage"
          :page-size="allPages.eachpage"
          @current-change="handleCurrentChange"
          @size-change="handleSizeChange"
          layout="total, sizes, prev, pager, next, jumper"
          :total="allPages.total"
        ></el-pagination>
      </div>
  </div>
</template>
<script>

export default {
  // props:["allPages"],
  props:{
    allPages:{
      type:Object
    }
  },
 
  methods: { 
    // 页码条
    handleSizeChange(val) {
      this.allPages.eachpage = val;
      this.$emit("handle",this.allPages)
    },
    // 页
    handleCurrentChange(val) {
      this.allPages.currentPage = val;
      this.$emit("handle",this.allPages)
    },
}
}
</script>

<style>
#block {
  margin-top: 30px;
}
</style>